package com.study.webapp.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.study.webapp.mapper.WordMapper;
import com.study.webapp.po.Word;

@Service
public class WordServiceImpl implements WordService {

	@Autowired
	private WordMapper wordMapper;

	@Override
	public Long insertWord(Word word) {
		word.setCreatTime(System.currentTimeMillis());
		word.setUpdateTime(System.currentTimeMillis());
		wordMapper.insertSelective(word);
		Long id = word.getId();
		return id;
	}

}
